<template>
	<view>
		<u-toast ref="uToast"></u-toast>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		mounted() {
			
		},
		methods: {
			success(message,duration=2000) {
				let param={
					icon:"https://cdn.uviewui.com/uview/demo/toast/success.png",
					message,
					type:"success",
					duration,
					position:"top"
				}
				this.$refs.uToast.show(param)
			},
			error(message,duration=2000) {
				let param={
					icon:"https://cdn.uviewui.com/uview/demo/toast/error.png",
					message,
					type:"error",
					duration,
					position:"top"
				}
				this.$refs.uToast.show(param)
			}
		}
	}
</script>
<style lang="scss">
	.u-page {
		padding: 0;
	}

	.u-cell-icon {
		width: 36rpx;
		height: 36rpx;
		margin-right: 8rpx;
	}

	.u-cell-group__title__text {
		font-weight: bold;
	}
</style>
